<template>
    <div class="new_house_list">
      <div @click="newHouseDetails(item.id)" v-for="item in newHouseList">
        <img v-if="item.thumbnail_img" v-lazy.container="item.thumbnail_img">
        <img v-else src="https://av.wuyoufang.com/assets/img/logo.jpg" alt="">
        <div class="building_list_content">
          <div class="title">{{item.name}}</div>
          <div class="content">
            <div class="left">
              <!--<span class="iconfont icon-ditu"></span>-->
              <span class="city">{{item.city}}-{{item.area}}</span>
              <!--<span>-</span>-->
              <!--<span class="building_name">恒大海上帝景</span>-->
            </div>
            <!--<div class="money_pay">-->
              <!--<span>78</span>万-->
            <!--</div>-->
          </div>
          <div class="housing">
            <div class="left">
              <span>建面</span>
              <span>{{item.build_acreage}} ㎡</span>
              <!--<span>中层</span>-->
              <!--<span>97㎡</span>-->
            </div>
            <div class="acreage" v-if="item.average_price">
              <span>{{item.average_price}}</span>/ ㎡
            </div>
            <div class="acreage" v-else>
              <span>价格待定</span>
            </div>
          </div>
          <div class="label">
            <span v-if="item.status_text" class="">{{item.status_text}}</span>
            <span v-if="item.labels" v-for="label in item.labels">{{label}}</span>
            <!--<span class="">{{item.product_type}}</span>-->
            <!--<span class="">海景</span>-->
          </div>
        </div>
      </div>

    </div>
</template>

<script>
  export default {
    props:{
      newHouseList:{
        type:Array
      }
    },
    name: 'NewHouseList',
    methods:{
      newHouseDetails(id){
        this.$router.push('/NewHouseDetails/' + id)
      }
    }
  }
</script>

<style scoped>
  .new_house_list {
    font-size: 0.8rem;
  }

  .new_house_list > div {
    border-top: 1px solid #eeeeee;
    padding: 10px;
    height: 5.5rem;
    display: flex;
  }

  .new_house_list img {
    height: 5.5rem;
    width: 6rem;
  }

  .new_house_list > div:nth-child(1) {
    border: none;
  }

 .new_house_list .building_list_content {
    flex: 1;
    margin-left: 10px;
    position: relative;
  }

 .new_house_list .building_list_content .title {
    /*font-size: 1.2rem;*/
    color: #333;
  }

  .new_house_list .building_list_content .content {
    height: 1rem;
    /*line-height: 1.2rem;*/
    display: flex;
    justify-content: space-between;
  }

  .new_house_list .building_list_content .content .left {
    font-size: 0.8rem;
    color: #999;
  }

  .new_house_list .building_list_content .content .icon-ditu {
    color: #e6191e;
    font-size: 0.8rem;
  }

 .new_house_list .building_list_content .content .money_pay {
    color: #e6191e;
    font-weight: bold;
  }

  .new_house_list .building_list_content .housing {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.8rem;
  }

  .new_house_list .building_list_content .label {
    position: absolute;
    bottom: 1px;
    left: 0;
    font-size: 1rem;
  }

  .new_house_list .building_list_content .label > span {
    padding: 3px 5px;
    font-size: 0.8rem;
    margin-right: 10px;
  }

  .new_house_list .building_list_content .label > span:nth-child(1) {
    background-color: #ffebea;
    color: #e6191e;
  }

  .new_house_list .building_list_content .label > span:nth-child(2) {
    background-color: #dff1fd;
    color: #42abff;
  }

  .new_house_list .building_list_content .label > span:nth-child(3) {
    background-color: #fde9dd;
    color: #fa6609;
  }

  .new_house_list .building_list_content .label > span:nth-child(4) {
    background-color: #dff1fd;
    color: #42abff;
  }
  .new_house_list .building_look_more>div{
    margin: 0 auto;
    height: 3rem;
    width: 10rem;
    line-height: 3rem;
    text-align: center;
    color: #b9b8b8;
    background-color: #f8f8f8;
  }
  .acreage{
    position: relative;
    top: -10px;
    color: #e6191e;
    font-size: 1.2rem;
  }
  .noneHouse{
    text-align: center;
    margin-top: 150px;
  }
</style>
